import { Navigate } from "react-router-dom";

//导入首页和城市组件
import Home from "../pages/Home";
import Index from "../pages/Index";
import News from "../pages/News";
import Profile from "../pages/Profile";
import HouseList from "../pages/HoustList";
import CityList from "../pages/CityList";
import Map from "../pages/Map";
// eslint-disable-next-line import/no-anonymous-default-export
export default [
  {
    path: "/",
    element: <Navigate to={"/home"} />,
  },
  {
    path: "/home",
    element: <Home />,
    children: [
      {
        path: "/home",
        element: <Index />,
      },
      {
        path: "news",
        element: <News />,
      },
      {
        path: "list",
        element: <HouseList />,
      },
      {
        path: "profile",
        element: <Profile />,
      },
    ],
  },
  {
    path: "/citylist",
    element: <CityList />,
  },
  {
    path: "/map",
    element: <Map />,
  },
];
